package com.shiguiwu.springmybatis.designpattern.decorator;

import lombok.extern.slf4j.Slf4j;

/**
 * @description: 装饰器模式
 * @author: stone
 * @date: Created by 2021/8/27 9:41
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.designpattern.decorator
 */
@Slf4j
public class DecoratorTests {

    public static void main(String[] args) {
        LoginSsoHandler handler = new LoginSsoHandler();
        boolean b = handler.preHandle("lsuccessdoudou", "response", "1");

        log.info("该方法访问的权限是 {}", b);


        LoginSsoDecorator decorator = new LoginSsoDecorator(new SsoInterceptor());

        boolean b1 = decorator.preHandle("lsuccessdoudou", "response", "1");

        log.info("该方法访问的权限是 {}", b1);

    }
}
